Problem: $-4gh - 8gi - 2g + 1 = -6h - 6$ Solve for $g$.
Solution: Combine constant terms on the right. $-4gh - 8gi - 2g + {1} = -6h - {6}$ $-4gh - 8gi - 2g = -6h - {7}$ Notice that all the terms on the left-hand side of the equation have $g$ in them. $-4{g}h - 8{g}i - 2{g} = -6h - 7$ Factor out the $g$ ${g} \cdot \left( -4h - 8i - 2 \right) = -6h - 7$ Isolate the $g$ $g \cdot \left( -{4h - 8i - 2} \right) = -6h - 7$ $g = \dfrac{ -6h - 7 }{ -{4h - 8i - 2} }$ We can simplify this by multiplying the top and bottom by $-1$. $g= \dfrac{6h + 7}{4h + 8i + 2}$